package com.x86.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.x86.domain.UserLoginLogVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.x86.domain.UserLoginLog;
import com.x86.mapper.UserLoginLogMapper;
import com.x86.service.UserLoginLogService;

/**
 * @author 风亦未止
 * @date 2022/4/10 19:27
 */
@Service
public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, UserLoginLog> implements UserLoginLogService {
    @Autowired
    public UserLoginLogMapper userLoginLogMapper;

    @Override
    public PageInfo<UserLoginLogVO> getLogList(int pageSize, int pageNum) {
        return PageHelper.startPage(pageNum,pageSize).doSelectPageInfo(()->{
            userLoginLogMapper.getLogList();
        });
    }

    @Override
    public Integer getLogCount() {
        return userLoginLogMapper.getLogCount();
    }
}


